package com.icebartech.core.utils;

import java.util.ResourceBundle;

/**
 * 版本控制工具类
 * @author Administrator
 *
 */
public class VersionUtil {

	public static int SYS_CODE_VERSION = 0;
	
	public static int APP_IPHONE_VERSION = 0;
	
	public static String APP_IPHONE_VERSION_NAME;
	
	public static String APP_IPHONE_URL;
	
	public static String APP_IPHONE_FIX_INFO;
	
	public static int APP_ANDROID_VERSION = 0;
	
	public static String APP_ANDROID_VERSION_NAME;
	
	public static String APP_ANDROID_URL;
	
	public static String APP_ANDROID_FIX_INFO;
	
	static{
		init();
	}
	
	private static void init(){
		try{
			ResourceBundle resourceBundle = ResourceBundle.getBundle("version");
			SYS_CODE_VERSION = Integer.parseInt(resourceBundle.getString("sys_code_version"));
			
			APP_IPHONE_VERSION = Integer.parseInt( resourceBundle.getString("app_iphone_version"));
			APP_IPHONE_VERSION_NAME = resourceBundle.getString("app_iphone_version_name");
			APP_IPHONE_URL = resourceBundle.getString("app_iphone_url");
			APP_IPHONE_FIX_INFO = resourceBundle.getString("app_iphone_fix_info");
			
			APP_ANDROID_VERSION = Integer.parseInt(resourceBundle.getString("app_android_version"));
			APP_ANDROID_VERSION_NAME = resourceBundle.getString("app_android_version_name");
			APP_ANDROID_URL = resourceBundle.getString("app_android_url");
			APP_ANDROID_FIX_INFO = resourceBundle.getString("app_android_fix_info");
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
